package com.yuw.bean.userinfo;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 实体类：数据传输的载体，有时，根据不同的作用，可以分为 bo po vo 等等
 * 默认约定：
 * 实体类中的字段要和数据库中的字段名保持一致；大小写可以不一样，但是内容必须一样
 */
public class UserInfoBean {
    // 属性 -- 和数据库保持一致
    private Integer userId; // 基本类型，如果没有特殊要求，一般在软件工程中，使用其包装类类型
    private String userName;
    private String userPsw;
    private String userAddress;
    private String userTel;
    private LocalDateTime userBirthday; // LocalDateTime 类型 对应mysql 数据库的 datetime类型
    // 查询条件字段
    private LocalDateTime userBirthday2; // LocalDateTime 类型 对应mysql 数据库的 datetime类型
    private Date userRegDate; // Date类型对应mysql数据库的 date 或者 datetimestamp 类型
    // 查询条件字段
    private Date userRegDate2; // Date类型对应mysql数据库的 date 或者 datetimestamp 类型
    private int userIsDelete; // 有特殊要求，要求默认值为0，所以使用基本类型

    // 提供getter/setter接口

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPsw() {
        return userPsw;
    }

    public void setUserPsw(String userPsw) {
        this.userPsw = userPsw;
    }

    public String getUserAddress() {
        return userAddress;
    }

    public void setUserAddress(String userAddress) {
        this.userAddress = userAddress;
    }

    public String getUserTel() {
        return userTel;
    }

    public void setUserTel(String userTel) {
        this.userTel = userTel;
    }

    public LocalDateTime getUserBirthday() {
        return userBirthday;
    }

    public void setUserBirthday(LocalDateTime userBirthday) {
        this.userBirthday = userBirthday;
    }

    public Date getUserRegDate() {
        return userRegDate;
    }

    public void setUserRegDate(Date userRegDate) {
        this.userRegDate = userRegDate;
    }

    public int getUserIsDelete() {
        return userIsDelete;
    }

    public void setUserIsDelete(int userIsDelete) {
        this.userIsDelete = userIsDelete;
    }

    public LocalDateTime getUserBirthday2() {
        return userBirthday2;
    }

    public void setUserBirthday2(LocalDateTime userBirthday2) {
        this.userBirthday2 = userBirthday2;
    }

    public Date getUserRegDate2() {
        return userRegDate2;
    }

    public void setUserRegDate2(Date userRegDate2) {
        this.userRegDate2 = userRegDate2;
    }

    // 仅用于测试


    @Override
    public String toString() {
        return "UserInfoBean{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", userPsw='" + userPsw + '\'' +
                ", userAddress='" + userAddress + '\'' +
                ", userTel='" + userTel + '\'' +
                ", userBirthday=" + userBirthday +
                ", userBirthday2=" + userBirthday2 +
                ", userRegDate=" + userRegDate +
                ", userRegDate2=" + userRegDate2 +
                ", userIsDelete=" + userIsDelete +
                '}';
    }
}
